import React from 'react'
import './app.scss'
import { withRouter, NavLink } from 'react-router-dom'
import { observer, inject } from 'mobx-react'
//准备考试
import Zhun from './zhun'
//开始考试
import Okkao from './Okkao'
//准备上机
import Com from './Com'
//完成上机
import Okcom from './Okcom'
//坐等面试
import Main from './mian'
@withRouter
@inject('kao')
@observer
class App extends React.Component {
    constructor(props) {
        super(props)
    }
    setNum = (text) => {
        this.setState({
            num: text
        })
        console.log(text)
    }
    render() {
        const { num } = this.props.kao
        return (
            <div className='kao'>
                <div className='box'>
                    <p>这是考试内容</p>
                    {num == 1 ? <Zhun setNums={()=>this.setNum()}></Zhun> : ''}
                    {num == 2 ? <Okkao></Okkao> : ''}
                    {num == 3 ? <Com></Com> : ''}
                    {num == 4 ? <Okcom></Okcom> : ''}
                    {num == 5 ? <Main></Main> : ''}
                </div>
            </div>
        )
    }
}
export default App